.<template>
  <section class="jumbotron">

      <h3 class="jumbotron-heading">Search Github Users</h3>
      <div>
        <input type="text" placeholder="enter the name you search" v-model="getVulue"/>&nbsp;
        <button @click="searchUsers">Search</button>
      </div>
    </section>
</template>

<script>
import axios from 'axios'
export default {
name:'MySerch',
data(){
  return{
    getVulue:''
  }
},
methods:{
  searchUsers(){
    this.$bus.$emit('getUser',{users:[],isLoading:true,isFrist:false,errorMsg:''})
    axios.get(`https://api.github.com/search/users?q=${this.getVulue}`).then(
      Response =>{
        this.$bus.$emit('getUser',{users:Response.data.items,isLoading:false,errorMsg:''})
      },
      error =>{
        this.$bus.$emit('getUser',{users:[],isLoading:false,errorMsg:error.message})
      }
    )
  }
}
}
</script>


<style>

</style>